{% extends "base.html" %}

{% block content %}

<div class="position-relative">
    <div class="position-absolute top-0 end-0">
        <a href="https://github.com/guydavis/machinaris/wiki/Chiadog" target="_blank">
            <i class="fs-4 bi-question-circle"></i>
        </a>
    </div>
</div>

<header class="pb-3 mb-4 border-bottom">
    <a href="/" class="d-flex align-items-center text-dark text-decoration-none">
        <span class="fs-4">Alerts - Chiadog - config.yaml </span>
    </a>
</header>

<div>
    {% with messages = get_flashed_messages(with_categories=true) %}
    {% if messages %}
    {% for category, message in messages %}
    {% if category == 'message' %}
    <div class="alert alert-warning" role="alert">
        {% else %}
        <div class="alert alert-{{ category }}" role="alert">
            {% endif %}
            {{ message }}
        </div>
        {% endfor %}
        {% endif %}
        {% endwith %}
    </div>

    <form method="POST">
        <fieldset>
            <div class="mb-3" id="texteditor">
                <textarea style="background: #D3D3D3;" class="form-control fs-6" id="chiadog" name="chiadog" rows="20"
                    style="height:100%;">{{ config }}</textarea>
            </div>
            <button type="submit" class="btn btn-outline-success">Save</button>
        </fieldset>
    </form>

    {% endblock %}